home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d17
/
sqc250.arc
/
SQC250.DOC
< prev
next >
Wrap
Text File
|
1991-12-08
|
16KB
|
463 lines
SQC v2.50
The Advanced Printer Utility
Copyright (C) 1990-1991 Daniel Baumberger
Dynamic Designs Software
STANDARD DISCLAIMER:
====================
This software is provided AS-IS. There is NO warranty,
either expressed or implied. Damage resulting from the use or
misuse of this software is NOT a responsibility of the author.
INTRODUCTION
============
SQC is a powerful printer utility that allows printer codes
to be sent to the printer from the MS-DOS command line. Codes
may be specified by pre-defined opcodes, literal characters,
and/or decimal, hexadecimal, or octal ASCII codes.
SQC also allows printing of files with or without page
breaks. The user can specify the number of lines per page. SQC
will then insert page breaks after the specified number of lines.
SQC also supports "continuous" printing, i.e. files that already
are formatted.
Version 2.50 adds more features to the list. A totally new,
object-oriented printer interface was designed for SQC. The
printer "object" controls the printer at the BIOS level. Error
checking is done on the character by character basis. SQC will
NOT print a character if the printer won't accept it.
When run with no command line arguments, SQC will print the
current status as returned by BIOS and what it means to you.
This is helpful in figuring out what is wrong with your printer.
New command lines switches were added: /PRINT, /LEN, and
/CHECK. /PRINT is the same as /P:. /LEN is the same as /L:.
/CHECK replaces the old "/C" parameter. /CHECK also has a
shorter form. Refer to the sections on COMMAND LINE PARAMETERS
for syntax.
SQC now supports more printer ports. LPT1, LPT2, and LPT3
are directly supported. They are specified by the /LPT# switch
described below.
Some items were dropped out of SQC v2.50. The numerous help
files are gone. The main help is now accessible through the /?
switch, as used in MS-DOS 5.0. The environment variables are
gone. In v3.0, a new environment variable will be introduced.
It will be a mini command line that gets executed EVERY time SQC
is run.
Upon removal of these features, SQC's .EXE file size was
reduce almost 50%!
GENERAL SYNTAX
==============
SQC's syntax looks like this:
SQC [/Options] [Codes/Opcodes]
The Options include:
/C[ON | OFF] <- Turn printer checking on/off
/CHECK=[ON | OFF] <- Turn printer checking on/off
/LPT# <- Select LPT port #
/P:fs <- Print files matching fs
/PRINT=fs <- Print files matching fs
/L:# <- Set the pagelength to #
/LEN=# <- Set the pagelength to #
/? <- Display a help screen with Options
SQC will display the current status of the printer when run with
no command line parameters or options. See PRINTER STATUS for
details.
Codes are explained in the section CODES. Opcodes are explained
in the section OPCODES.
PRINTER CHECKING
================
By default, SQC checks with the BIOS to make sure the
printer is ready. If not, SQC will display a message allowing
you to fix the problem or abort the program. With printer
checking off, SQC prints the character via the BIOS. The BIOS
will sit and wait until the printer is ready, or forever if
necessary. Due to this, it is better to leave the printer
checking on. However, printer checking does cause a little time
overhead because it makes a BIOS call and does some checking.
To turn the printer checking off, you can use either of
these two forms:
SQC /COFF
SQC /CHECK=OFF
Either way is correct. NOTE: Turning printer checking off
by the switch ONLY turns it off for that execution of the
program. The next time SQC is run, it will use the standard
defaults.
Similarly, the printer checking can be turned on in either
of these two forms:
SQC /CON
SQC /CHECK=ON
Using these switches, one can turn the printer checking off
for some parameters and on for others. For example,
SQC /COFF ESC @ /CON /PRINT=*.DOC
In this example, the printer checking is turned off and an
opcode (escape) and a character are sent. Then, printer checking
is re-established and SQC will print all the files matching *.DOC
with printer checking.
NOTE: Case is insignificant. /CON = /con = /CoN = /cOn,
etc.
SELECTING A PORT
================
SQC v2.50 now allows other LPT ports to be used. To specify
a different port, use the /LPT# command. # should be replaced by
the number of the port. Valid ports are 1, 2, and 3. Anything
else will generate an error. For example,
SQC /LPT2 ESC @ /LPT1 /PRINT=*.TXT
In this example, ESC and '@' are sent to the printer
connected to LPT2:. Then, all .TXT files in the current
directory are printed on LPT1:. Again, case of LPT is
insignificant.
PRINTING FILES
==============
SQC can print files with or without page breaks. SQC
supports any size pages. A size of 0 will generate a
"continuous" printout. SQC will not send form feeds to skip the
partitions. The default in SQC v2.50 is now continuous.
Continuous printing can be used for files that already contain
page formatting commands.
Two switches are available to specify the file specification
to print: /P: and /PRINT=. /P: was used in previous version.
/PRINT= is ONLY available in v2.50. Both take a MS-DOS file
specification. A file specification can be a single filename or
use either or both of the MS-DOS wildcards: ? and *. For
example, *.DOC specifies all files with the DOC extension.
A??.A?? will print any files that start with and a, have two more
characters, and have an extension that starts with an A and has
two more characters. This will match files like AAA.AAA,
AZZ.ABC, etc.
In version 2.50, SQC defaults to continuous print. To split
pages after so many lines, one uses the /L: or /LEN= parameter.
Here are some examples of printing commands:
SQC /LEN=60 /PRINT *.MOD
SQC /L:0 /P:*.?
The first example prints all .MOD (Modula-2) files splitting
pages after 60 lines. The second example continuously prints all
files with a one character extension. NOTE: SQC sends a form
feed to the printer between files so that each file starts on a
new page.
What happens if you start printing and find out that you
don't want to print the files? Pressing a key aborts printing of
the current file only. Pressing a key many times will abort more
files. At present, there is no way to abort the whole print
process (unless you turn off the printer and select the "abort"
option when SQC reports an error).
CODES
=====
Codes can be in one of four forms: decimal ASCII,
hexadecimal ASCII, octal ASCII, and literal characters. Here is
the logic that SQC uses to determine which category a code falls
under:
(1) If the length of the code is 1, then it is sent "as-is" as a
literal character.
(2) If the code starts with a 1, 2, 3, 4, 5, 6, 7, 8, or 9, then
it is processed as a decimal ASCII code.
(3) If the code starts with a 0X or a 0x, then it is processed as
a hexadecimal ASCII code.
(4) If the code starts with a 0 (and is NOT followed by an 'x'),
then it is processed as an octal ASCII code.
(5) If all these fail, then it is processed as an opcode (or an
error).
Here is an example:
SQC 0x1B @ 120 061
SQC will send 0x1B, or the escape character, the '@'
character (ASCII 64), the decimal code 120 ('x'), and the octal
code 061 ('1').
OPCODES
=======
SQC has 32 predefined opcodes. They are the standard ASCII
names for the control codes. Since most of these characters
cannot be displayed, SQC will substitute their opcode name in
their place. Here are the predefined opcodes and their decimal,
hexadecimal, and octal values.
Codes marked with '*' are not accessible using SQC. These
are the single digit decimal codes. They will be interpreted as
characters '1' through '9'. Use the octal or hexadecimal value
instead.
OPC Dec Hex Oct What is It?
============================================================
NUL * 0x00 00 The "NULL" character
SOH * 0x01 01 Start Of Header
STX * 0x02 02 Start TeXt
ETX * 0x03 03 End of TeXt
EOT * 0x04 04 End Of Transmission
ENQ * 0x05 05 Inquiry
ACK * 0x06 06 Acknowledgment
BEL * 0x07 07 The Bell Character
BS * 0x08 10 BackSpace
HT * 0x09 11 Horizontal Tab
LF 10 0x0A 12 Line Feed
VT 11 0x0B 13 Vertical Tab
FF 12 0x0C 14 Form Feed
CR 13 0x0D 15 Carriage Return
SO 14 0x0E 16 Shift Out
SI 15 0x0F 17 Shift In
DLE 16 0x10 20 Data Link Escape
DC1 17 0x11 21 Device Control 1
DC2 18 0x12 22 Device Control 2
DC3 19 0x13 23 Device Control 3
DC4 20 0x14 24 Device Control 4
NAK 21 0x15 25 Negative Acknowledgement
SYN 22 0x16 26 Synchronous Idle
ETB 23 0x17 27 End of Transmission Block
CAN 24 0x18 30 Cancel
EM 25 0x19 31 End of Medium
SUB 26 0x1A 32 Substitute
ESC 27 0x1B 33 Escape
FS 28 0x1C 34 File Separator
GS 29 0x1D 35 Group Separator
RS 30 0x1E 36 Record Separator
US 31 0x1F 37 Unit Separator
SP 32 0x20 40 Space
PRINTER STATUS
==============
New to SQC v2.50 is printer status. When run with no
command line arguments, SQC will display what the BIOS says the
current state of your printer.
A "normal" status value should be 144. That means that the
printer is NOT busy, and the printer is selected. Here are the
other errors that can be returned and what could cause them.
"Busy" : That usually means that the printer is currently doing
something. SQC can compensate for this when printing codes and
files so other than the status, it will not occur.
"Not Busy" : The printer isn't doing anything (or so it
thinks...).
"Acknowledge" : Other than the name, this one is not used much.
I do not know in what cases it would be generated. However, it
is included because BIOS can return it.
"Out of Paper" : This one is more obvious. However, it can also
occur when the printer is off. Other errors will be generated
when the printer is off so this one is used for what its name
says.
"Selected" : This is one the "normal" returns. The printer
should always be selected. If not, then some error has occurred.
Other errors should describe the problem.
"I/O Error" : Another obvious one. The printer is either off or
off line. It could also be that the printer is not hooked up (or
non-existant).
"Time-out" : Obvious name, unobvious function. This is another
status that is rarely generated. It could be generated when the
printer is off or off line. It depends on the BIOS of the
machine.
REGISTRATION
============
SQC is NOT a free program. It is shareware. You are
granted a limited license to use SQC to see if it meets your
needs. After 30 days, you are required to register the program
with the author. Complete registration is $10 including two free
updates. Registered users also receive other programs from
Dynamic Designs Software. To register, send a check (payable to
DANIEL BAUMBERGER) to:
Daniel Baumberger
Dynamic Designs Software
811 South Nevada Drive
Longview, WA 98632-5611
Please include the version number that you have.
As always, questions, comments, suggestions, and problems
are welcome!! Write or E-Mail and I will see what I can do.
I can also be reached via E-Mail (Internet) at this address:
baumb@cs.washington.edu
INTO THE FUTURE
===============
What is coming? The ideas that I have are an environment
variable that acts as a "mini-command line" to be executed each
time SQC is run. User defined opcodes or macros are another
possibility. I am also thinking of an "interpreter" mode. Also,
command files specifying commands and other things.
If you have things that you would like to see, write the
address above or send E-Mail to the Internet address above.
NOTE: the E-Mail address is temporary. It will expire upon
graduation from the University of Washington. Right now... that
date is uncertain.
OTHER PROGRAMS FROM DYNAMIC DESIGNS
===================================
There are two other programs being distributed under the
Dynamic Designs Software label: SQM and DDPC.
DDPC stands for Dynamic Designs Park Controller. It will
park up to 32,767 hard discs installed in a system! DDPC v2.50
(release at the same time as SQC 2.50) also supports a screen-
saver mode. It will also display information on all drives
installed on the system.
SQM is a mouse utility for MS-MOUSE compatible mouse systems
(including Logitech). It allows MANY options in using the mouse:
speeding it up, slowing it down, disabling it altogether,
enabling, a "test" mode to see what speed is best for you,
saving/loading states so that different programs can have
different settings.
Upon registration of SQC, you will automatically receive the
others.